Port to dh 12
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Sun, 16 Jun 2019 12:23:42 +0000 (14:23 +0200)
committerJochen Sprickerhof <git@jochen.sprickerhof.de>
Sun, 16 Jun 2019 17:21:09 +0000 (19:21 +0200)
Closes: #912089
15 files changed:
debian/clean [new file with mode: 0644]
debian/compat [deleted file]
debian/control
debian/gpsbabel-doc.doc-base [new file with mode: 0644]
debian/gpsbabel-doc.doc-base-common [deleted file]
debian/gpsbabel-doc.doc-base-pdf [deleted file]
debian/gpsbabel-doc.docs [new file with mode: 0644]
debian/gpsbabel-doc.install [deleted file]
debian/gpsbabel-gui.desktop [deleted file]
debian/gpsbabel-gui.install
debian/gpsbabel-gui.menu [deleted file]
debian/gpsbabel.install [new file with mode: 0644]
debian/patches/0011-Fix-exec-in-gpsbabel.desktop.patch [new file with mode: 0644]
debian/patches/series
debian/rules

diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..cdd0b99
--- /dev/null
@@ -0,0 +1,4 @@
+debian/doctmp/
+debian/doctmpcapabilities.inc
+debian/gpsbabel.1
+debian/gpsbabel.xpm
diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index f599e28..0000000
+++ /dev/null
@@ -1 +0,0 @@
-10
index e5995e81b2df9d25900808f0f7de021427dac0e2..300fe19c561e48e196850b488ebddd88928a80a3 100644 (file)
@@ -2,19 +2,21 @@ Source: gpsbabel
 Section: utils
 Priority: optional
 Maintainer: Bernd Zeimetz <bzed@debian.org>
-Build-Depends: debhelper (>= 10~), quilt,
autotools-dev, autoconf,
+Build-Depends: debhelper-compat (= 12),
pkg-config,
  libexpat1-dev, expat, help2man,
  libxml2-utils,
  libusb-dev, zlib1g-dev,
- qtbase5-dev,
+ libshp-dev,
+ qt5-default,
  qtwebengine5-dev [amd64 arm64 armhf i386 mipsel],
  qttools5-dev-tools,
  imagemagick,
  locales-all
 Build-Depends-Indep: fop [!mips], xsltproc, docbook-xml,
  docbook-xsl, libpaper-dev 
-Standards-Version: 3.8.4
+Standards-Version: 4.3.0
+Rules-Requires-Root: no
 Homepage: http://www.gpsbabel.org/
 Vcs-Git: https://github.com/bzed/pkg-gpsbabel.git
 Vcs-Browser: https://github.com/bzed/pkg-gpsbabel
@@ -51,10 +53,11 @@ Description: GPS file conversion plus transfer to/from GPS units
 
 Package: gpsbabel-doc
 Architecture: all
+Multi-Arch: foreign
 Section: doc
 Depends: ${misc:Depends}
 Suggests: gpsbabel, pdf-viewer | www-browser
-Description: GPS file conversion plus transfer to/from GPS units
+Description: GPS file conversion plus transfer to/from GPS units - documentation
  GPSBabel converts waypoints, tracks, and routes from one format to
  another, whether that format is a common mapping format like Delorme,
  Streets and Trips, or even a serial upload or download to a GPS unit
diff --git a/debian/gpsbabel-doc.doc-base b/debian/gpsbabel-doc.doc-base
new file mode 100644 (file)
index 0000000..ea8d6b9
--- /dev/null
@@ -0,0 +1,10 @@
+Document: gpsbabel
+Title: gpsbabel filter and format documentation
+Section: Science/Geoscience
+
+Format: HTML
+Files: /usr/share/doc/gpsbabel/gpsbabel.html
+Index: /usr/share/doc/gpsbabel/gpsbabel.html
+
+Format: PDF
+Files: /usr/share/doc/gpsbabel/gpsbabel.pdf.gz
diff --git a/debian/gpsbabel-doc.doc-base-common b/debian/gpsbabel-doc.doc-base-common
deleted file mode 100644 (file)
index 68cc45d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Document: gpsbabel
-Title: gpsbabel filter and format documentation
-Section: Science/Geoscience
-
-Format: HTML
-Files: /usr/share/doc/gpsbabel/gpsbabel.html
-Index: /usr/share/doc/gpsbabel/gpsbabel.html
-
diff --git a/debian/gpsbabel-doc.doc-base-pdf b/debian/gpsbabel-doc.doc-base-pdf
deleted file mode 100644 (file)
index 25c5b5b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Format: PDF
-Files: /usr/share/doc/gpsbabel/gpsbabel.pdf
-
diff --git a/debian/gpsbabel-doc.docs b/debian/gpsbabel-doc.docs
new file mode 100644 (file)
index 0000000..9f7267b
--- /dev/null
@@ -0,0 +1,2 @@
+gpsbabel.html
+gpsbabel.pdf
diff --git a/debian/gpsbabel-doc.install b/debian/gpsbabel-doc.install
deleted file mode 100644 (file)
index 71d2e65..0000000
+++ /dev/null
@@ -1 +0,0 @@
-debian/doctmp/* usr/share/doc/gpsbabel
diff --git a/debian/gpsbabel-gui.desktop b/debian/gpsbabel-gui.desktop
deleted file mode 100644 (file)
index 31fbb85..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Type=Application
-Name=GPSBabel
-Comment=
-Exec=gpsbabelfe
-Terminal=false
-StartupNotify=no
-Icon=gpsbabel.xpm
-Categories=Education;Science;Geoscience
index 4ac5cebc8f419541cea5465b681b73f7cea76d5c..640bf7c891b6f14257ec5d6b0daed6de3023be1f 100644 (file)
@@ -1,3 +1,3 @@
-gui/objects/gpsbabelfe /usr/bin
+gui/gpsbabelfe /usr/bin
 debian/gpsbabel.xpm /usr/share/pixmaps
-debian/gpsbabel-gui.desktop /usr/share/applications
+gui/gpsbabel.desktop /usr/share/applications
diff --git a/debian/gpsbabel-gui.menu b/debian/gpsbabel-gui.menu
deleted file mode 100644 (file)
index 6cae1da..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-?package(gpsbabel-gui): needs="X11"\
-   section="Applications/Science/Geoscience"\
-   title="GPSBabel"\
-   icon="/usr/share/pixmaps/gpsbabel.xpm"\
-   command="/usr/bin/gpsbabelfe"
diff --git a/debian/gpsbabel.install b/debian/gpsbabel.install
new file mode 100644 (file)
index 0000000..9e0436b
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/gpsbabel
diff --git a/debian/patches/0011-Fix-exec-in-gpsbabel.desktop.patch b/debian/patches/0011-Fix-exec-in-gpsbabel.desktop.patch
new file mode 100644 (file)
index 0000000..724056b
--- /dev/null
@@ -0,0 +1,20 @@
+From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
+Date: Sun, 16 Jun 2019 16:09:18 +0200
+Subject: Fix exec in gpsbabel.desktop
+
+---
+ gui/gpsbabel.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gui/gpsbabel.desktop b/gui/gpsbabel.desktop
+index 4ae4525..fe956c2 100644
+--- a/gui/gpsbabel.desktop
++++ b/gui/gpsbabel.desktop
+@@ -4,6 +4,6 @@ Name=GPSBabel
+ Comment=Qt GUI interface for GPSBabel
+ GenericName=GPSBabel
+ Icon=gpsbabel
+-Exec=gpsbabelfe-bin
++Exec=gpsbabelfe
+ Terminal=false
+ Categories=Geography;Education;Utility;
index 35b51276168954bb52b3ead57c792e0e6f2cf320..d8b0e030451eed1ac1b2b358ba65f29b12107c79 100644 (file)
@@ -5,3 +5,4 @@ htmldoc-location
 0006-Use-system-zlib.patch
 0007-Use-system-shapelib.patch
 0008-Use-usb.h-from-system-include-dir.patch
+0011-Fix-exec-in-gpsbabel.desktop.patch
index 5a3d77f16cf104368cea278cc8210c8c299ff838..45bacbf4823b7baa87ce6411f363172acc716f1d 100755 (executable)
@@ -1,52 +1,27 @@
 #!/usr/bin/make -f
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+%:
+       dh $@
 
-export QT_SELECT=qt5
-
-
-PKG_GPSBABEL=gpsbabel
-PKG_GPSBABEL_GUI=gpsbabel-gui
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DOCTEMP = $(CURDIR)/debian/doctmp
-VERSION := $(shell dpkg-parsechangelog | awk '/^Version/ {print $$2}')
-HOSTARCH := $(strip $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU))
-
-#we use quilt to handle our patches
-include /usr/share/quilt/quilt.make
-
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
+include /usr/share/dpkg/pkg-info.mk
 
 # Extended precision on i386 results in weird bugs, so we build
 # with -ffloat-store.
-ifeq (i386,$(HOSTARCH))
+ifneq (,$(filter $(DEB_BUILD_ARCH),i386))
 CFLAGS += -ffloat-store
 endif
 
-LDFLAGS +=  -Wl,-z,defs
-CONFENV = LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
-
-
-configure: configure-stamp gui/Makefile
-configure-stamp: $(QUILT_STAMPFN)
-       dh_testdir
-       dh_autotools-dev_updateconfig
-       mkdir -p xmldoc/autogen
-       $(CONFENV) ./configure \
+override_dh_auto_configure:
+       dh_auto_configure -- \
                --with-zlib=system \
                --with-doc=$(DOCTEMP) \
                --prefix=/usr
+       convert -resize 32x32 gui/images/appicon.png debian/gpsbabel.xpm
 
-       touch $@
 
-debian/gpsbabel.1: build-stamp
+override_dh_installman:
        export PATH="$(CURDIR)/gpsbabel:$$PATH" ;\
        help2man        --manual='gpsbabel documentation' \
                        --section=1 \
@@ -54,138 +29,13 @@ debian/gpsbabel.1: build-stamp
                        --source='http://www.gpsbabel.org' \
                        --locale=C \
                        -N \
-                       --version-string=$(VERSION) \
+                       --version-string=$(DEB_VERSION) \
                        --opt-include=$(CURDIR)/debian/gpsbabel.help2man \
-                       -o $@ \
+                       -o debian/gpsbabel.1 \
                        ./gpsbabel
+       dh_installman
 
-gui/Makefile: $(QUILT_STAMPFN)
-       set -e; cd gui; if dpkg -s qtwebengine5-dev; then \
-           qmake; \
-       else \
-           echo -e '#!/usr/bin/make -f\n\n%:\n\techo $$@' > Makefile ; \
-       fi
-
-debian/gpsbabel.xpm: gui/images/appicon.png
-       convert -resize 32x32 $< $@
-
-BUILD_TARGETS_ARCH = build-stamp build-gui-stamp debian/gpsbabel.1
-BUILD_TARGETS_INDEP = build-doc-stamp
-# indep targets are only built by binary-indep.
-build: $(BUILD_TARGETS_ARCH)
-
-build-stamp: configure-stamp debian/gpsbabel.xpm
-       dh_testdir
-
-       # Add here commands to compile the package.
-       $(MAKE)
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-       chmod u+x testo
-       $(MAKE) check || true
-endif
-
-       touch $@
-
-# We need a gpsbabel binary to build the documentation.
-build-doc-stamp: build-stamp
-       mkdir -p debian/doctmp/htmldoc-devel
-       perl xmldoc/makedoc && cd ..
+override_dh_installdocs:
+       $(MAKE) doc
        $(MAKE) gpsbabel.html
-       cp gpsbabel.html debian/doctmp
-       cp $(CURDIR)/debian/gpsbabel-doc.doc-base-common $(CURDIR)/debian/gpsbabel-doc.doc-base
-ifneq (mips,$(HOSTARCH))
-       $(MAKE) gpsbabel.pdf WEB=$(DOCTEMP) DOCVERSION=devel
-       cp gpsbabel.pdf $(DOCTEMP)
-       cat $(CURDIR)/debian/gpsbabel-doc.doc-base-pdf >> $(CURDIR)/debian/gpsbabel-doc.doc-base
-endif
-       rm -rf debian/doctmp/htmldoc-devel
-       touch $@
-
-build-gui: build-gui-stamp
-build-gui-stamp: gui/Makefile
-       if dpkg -s qtwebengine5-dev; then $(MAKE) gui; fi
-       touch $@
-
-clean: clean-patched unpatch
-clean-patched:
-       dh_testdir
-       dh_testroot 
-       rm -f *-stamp dep doc/*.ps
-       rm -rf xmldoc/autogen
-       rm -f debian/gpsbabel.xpm
-
-       # Add here commands to clean up after the build process.
-       [ ! -f Makefile ] || $(MAKE) clean
-       [ ! -f gui/Makefile ] || $(MAKE) gui clean
-       rm -rf debian/doctmp xmldoc/autogen/*
-       rm -rf Makefile config.h config.log config.status \
-               gpsbabel.fo tools/mkcapabilities win32/gpsbabel.rc \
-               xmldoc/makedoc \
-               zlib/empty jeeps/Makefile shapelib/Makefile
-       rm -f debian/*.inc
-       rm -rf gui/Makefile gui/objects gui/setup.iss
-       rm -f debian/gpsbabel.1
-       rm -f gpsbabel.pdf
-       rm -f gui/makelinuxdist.sh
-       rm -f   xmldoc/formats/tomtom_itn_places.xml \
-               xmldoc/formats/options/naviguide-reorder.xml \
-               xmldoc/formats/options/naviguide-output.xml \
-               xmldoc/filters/options/track-trk2seg.xml \
-               xmldoc/filters/options/track-seg2trk.xml
-       rm -f gbversion.h
-       rm -f $(CURDIR)/debian/gpsbabel-doc.doc-base
-       dh_autotools-dev_restoreconfig
-       dh_clean
-
-install-prep:
-       dh_testdir
-       dh_testroot
-       dh_prep
-       dh_installdirs
-
-install-arch: $(BUILD_TARGETS_ARCH) install-prep
-
-       # Add here commands to install the package into debian/gpsbabel.
-       $(MAKE) install DESTDIR=$(CURDIR)/debian/gpsbabel
-
-       dh_install -a 
-
-install-indep: $(BUILD_TARGETS_INDEP) install-prep
-       dh_install -i
-
-
-install: install-arch install-indep
-
-# Build architecture-independent files here.
-binary-indep: build-indep install-indep
-       dh_testdir 
-       dh_testroot
-       dh_installchangelogs -i 
-       dh_installdocs -i
-       dh_link -i 
-       dh_compress -i -X.pdf -X.html
-       dh_fixperms -i
-       dh_installdeb -i
-       dh_gencontrol -i
-       dh_md5sums -i
-       dh_builddeb -i
-
-# Build architecture-dependent files here.
-binary-arch: build-arch install-arch
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs -a
-       dh_installdocs -a
-       dh_installman -a
-       dh_installmenu -a
-       dh_strip -a
-       dh_compress -a -X.pdf -X.html
-       dh_fixperms -a
-       dh_installdeb -a
-       dh_shlibdeps -a
-       dh_gencontrol -a
-       dh_md5sums -a
-       dh_builddeb -a
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install install-prep install-arch install-indep build-arch build-indep configure 
+       dh_installdocs